package mao.thinkinjava.io;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class TestFileReader {
    public static void main(String[] args) throws IOException {
        FileReader reader = new FileReader("C:\\Users\\xk1008\\IdeaProjects\\untitled\\src\\com\\mao\\thinkinjava\\io\\TestFileReader.java");
        //FileReader reader = new FileReader("TestFileReader.java");
        BufferedReader in = new BufferedReader(reader);
        StringBuilder builder = new StringBuilder();
        String s ;
        while ((s=in.readLine()) != null){
            builder.append(s+"\n");
        }
        in.close();
        System.out.println(builder.toString());
    }
}
